<?PHP $this->_extends('_layouts/manager_layout');?>
<?PHP $this->_block('head');?>
<style>
.gooditem{
	width: 230px;height: 130px;
}
</style>
<?PHP $this->_endblock();?>
<?PHP $this->_block('contents');?>
<div class="content">
	<h1 class="aa1"> 批量修改商品信息 </h1>
	<div>
		<?php if (count($goods)>0):foreach ($goods as $g): ?>
<div class="gooditem lft">
	<a href="<?php echo url('/goodsedit',array('goods_id'=>$g->goods_id))?>" target="_blank">
	<img src="<?=$g->imgurl?>" width="64" height="64" align="left" title="<?=$g->title?>"></a>
	价格：<?php echo $g->price?><br>
	市场价：<?php echo $g->market_price?><br>
	类目Id:<?php echo $g->category_id?><br>
	商品编号(SN): <?php echo $g->sn?><br>
</div>
	<?php endforeach;endif;?>

	</div>
	<div style="clear:both"></div>
	<form action="" method="post">
	<input type="hidden" name="cmd" value="dobatchmodify" />
	<?php if (count($goods)>0):foreach ($goods as $g):?>
	<input type="hidden" name="goods_id[<?=$g->goods_id?>]" value="<?=$g->goods_id?>">
	<?php endforeach;endif;?>
	<table class="ebay_table" style="text-align:left;">
		<tr><td colspan="3" style="font-weight: bold"> 更新类目</td></tr>
		<tr><th>新类目</th><td width="200">
		<?php $this->_control('dropdownlist','newcategory',array('items'=>
			array('选择新类目')+ Helper_Array::toHashMap($categories->toArray(),'category_id','name')
		));?>
		</td><td></td></tr>
		
		<tr><td colspan="3" style="font-weight: bold"> 更新标签</td></tr>
		<tr><th>新标签</th><td width="200">
		<input type="checkbox" name="newtag" value="1"  /> 更新标签  <br />
		<?php if(count($Taggoods)): foreach($Taggoods as $tg):?>
    	<div style=" display:inline"><input type="checkbox" name="tag_id[]" value="<?=$tg->tag_id?>" /> <?=$tg->tag_name?> </div>
		<?php endforeach; endif;?>
		</td><td></td></tr>
		
		<tr>  </tr>
		<tr><td colspan="3" style="font-weight: bold"> 对选中产品的价格进行批量设定</td></tr>
		<tr><th width="80">价格</th><td width="200"> 
		<?php $this->_control('dropdownlist','operator_price',array('items'=>array(
			'选择运算符',
			'='=>'=',
			'+'=>'+',
			'-'=>'-',
			'*'=>'X',
		)));?>
		 <input type="text" name="price" id="price" size="10"></td><td></td></tr>
		<tr><th>市场价格</th><td>
		<?php $this->_control('dropdownlist','operator_market_price',array('items'=>array(
			'选择运算符',
			'='=>'=',
			'+'=>'+',
			'-'=>'-',
			'*'=>'X',
		)));?>
		<input type="text" name="market_price" id="market_price" size="10"></td><td></td></tr>
		<tr><td colspan="3">
			<input type="submit" value="确认"> &nbsp;&nbsp;&nbsp;&nbsp;
			<input type="button" value="       返回商品列表       "  onclick="location.replace('<?=url('/goods')?>')" classs="anniu"/>
		</td></tr>
	</table>		
	</form>
</div>
<script type="text/javascript">
function selectedTags(tag){
	document.getElementById('newtag').value=tag;
}
function selectedCateory(category){
	document.getElementById('newcategory').value=category;
}
</script>
<?PHP $this->_endblock();?>

